DomainObjects Class Library

Query.FindObjectByPrimaryKey Method (Key)

Retrieves a persistable object by its primary key.

public static ClassToFind <ClassToFind>FindObjectByPrimaryKey(
   Key primaryKey
); where ClassToFind: PersistableObject

Parameters

primaryKey
The object's primary key.

Return Value

If found, the instance of the given type with the given primary key, otherwise null.

Example

See a usage example at QueryTests.FindObjectByPrimaryKey().

See Also

Query Class | DomainObjects.Facade.Command Namespace | Query.FindObjectByPrimaryKey Overload List